package nc.ui.arap.pubdj;

import nc.ui.pub.bill.BillCardPanel;
import nc.ui.pub.bill.BillListPanel;
import nc.vo.ep.dj.DJZBHeaderVO;
import nc.vo.ep.dj.DJZBItemVO;

public class ArapBillcardUpdater {

	public static void updateBillCardHead(BillCardPanel bcp,String[] attrs,DJZBHeaderVO head){
		for(int i=0,size=attrs.length;i<size;i++){
			bcp.setHeadItem(attrs[i],head.getAttributeValue(attrs[i]));
		}
	}
	public static void upateBillCardBody(BillCardPanel bcp,String[] attrs,DJZBItemVO item,int row){
		for(int i=0,size=attrs.length;i<size;i++){
			bcp.setBodyValueAt(item.getAttributeValue(attrs[i]),row,attrs[i]);
		}
	}
	public static void updateBillListHead(BillListPanel blp,String[] attrs,DJZBHeaderVO head,int row){
		for(int i=0,size=attrs.length;i<size;i++){
			blp.getHeadBillModel().setValueAt(head.getAttributeValue(attrs[i]),row,attrs[i]);
		}
	}
	public static void updateBillListBody(BillListPanel blp,String[] attrs,DJZBItemVO item,int row){
		for(int i=0,size=attrs.length;i<size;i++){
			blp.getBodyBillModel().setValueAt(item.getAttributeValue(attrs[i]),row,attrs[i]);
		}
	}
}
